﻿using System;
using System.Linq;
using System.Collections.Generic;

namespace System.Collections.Generic
{
    public static class IEnumerableExtension
    {
        public static bool IsEmpty<T>(this IEnumerable<T> source)
        {
            return source.Any() == false;
        }

        public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)
        {
            foreach (var item in source)
            {
                action(item);
            }
        }

        public static string ConcatText<T>(this IEnumerable<T> source, string separator)
        {
            return string.Join(separator, source);
        }
    }
}
